﻿/**
 * \brief 处理线程
 * \file CRunningThread.h
 */

#ifndef __CRUNNING__THREAD__H
#define __CRUNNING__THREAD__H

#include <vector>
#include "CThread.h"
#include "CTaskQueue.h"

class CTcpTaskPool;

/// 处理线程
class CRunningThread : public CThread
{
	public:
		CRunningThread(CTcpTaskPool* _pool, int _eventSize, std::string _threadName = "CRunningThread");
		virtual ~CRunningThread();

	public:
		/// 线程主回调函数
		virtual void run() = 0;

	private:
		/// 加入任务列表
		virtual void add(CTcpTask* _pTask) = 0;

		/// 从任务列表删除
		virtual void remove(_task_list_iter& _iter) = 0;
};

#endif	/// __CRUNNING__THREAD__H

